Salesforce UX API icon

Salesforce UX API

(0 reviews)

TMF-700 Create Shipping Order Quote

Create shipping order, AKA Create Quote in DoorDash

URL
https://[localhost]:[port]/sfdc-ux/v1/{businessId}/shippingOrder
url Param
nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit.Y
nametypedescriptionrequired
client_idstringThe client_id identifying the channel. Minimum characters: 5Y
client_secretstringPassword associated with the client_id. Minimum characters: 5Y
X-Correlation-IDstringIdentifier that correlates HTTP request between a client and server.
Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction.
Y
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/sfdc-ux/sfdc-ux/v1/PR/shippingOrder' \
--header 'client_id: 12344' \
--header 'client_secret: 11111' \
--header 'X-Correlation-ID: 989768897700' \
--header 'Content-Type: application/json' \
--data-raw '{
    "placeTo": {
        "name": "901 Market Street 6th Floor San Francisco, CA 94103", //dropoff_address
        "city": "San Juan", //dropoff_address_components.city
        "country": "US", //dropoff_address_components.country
        "postCode": "00911", //dropoff_address_components.zip_code
        "stateOrProvince": "PR", //dropoff_address_components.state
        "streetName": "110 Calle del Parque", //dropoff_address_components.street
        "geographicLocation": {
            "bbox": [
                123.1312343, //dropoff_longitude
                -37.2144343 //dropoff_Latitude
            ],
            "@type": "GeoJsonPoint"
        },
        "role": "Recipient",
        "@referredType": "GeographicAddress"
    },
    "placeFrom": {
        "name": "901 Market Street 6th Floor San Francisco, CA 94103", //pickup_address
        "geographicSubAddress": [
            {
                "id": "myBusiness123", //pickup_external_business_id
                "name": "store-456" //pickup_external_store_id
            }
        ],
        "role": "PickupStore",
        "@referredType": "GeographicAddress"
    },
    "relatedParty": [
        {
            "name": "John Doe", //dropoff_contact_given_name + dropoff_contact_family_name  or dropoff_business_name
            "role": "Recipient", //indicates dropoff information
            "@referredType": "Individual",
            "contactMedium": [
                {
                    "mediumType": "Phone",
                    "preferred": true,
                    "characteristic": {
                        "phoneNumber": "+16505555555" //dropoff_phone_number
                    }
                }
            ]
        },
        {
            "name": "Liberty Store", //pickup_business_name
            "role": "PickupStore", //indicates pickup information
            "@referredType": "Organization",
            "contactMedium": [
                {
                    "mediumType": "Phone",
                    "preferred": true,
                    "characteristic": {
                        "phoneNumber": "+16505555555" //pickup_phone_number
                    }
                }
            ]
        }
    ],
    "shippingInstruction": {
        "signatureRequired": true, //dropoff_requires_signature true/false
        "deliveryTimeSlot": { //drop_off_window
            "endDateTime": "2025-07-09T14:35:52.962-04:00",
            "startDateTime": "2025-07-08T14:35:52.962-04:00"
        },
        "instructionCharacteristic": [
            {
                "name": "pickup_instructions",
                "value": "Go to the bar for pick up." //pickup_instructions
            },
            {
                "name": "dropoff_instructions",
                "value": "Enter gate code 1234 on the callbox." //dropoff_instructions
            }
        ]
    },
    "shippingOrderCharacteristic": [
        {
            "name": "shipping_partner", //to indicate integration with DoorDash (Mondatory for routing)
            "value": "doordash"
        },
        {
            "name": "order_fulfillment_method",
            "value": "standard" //order_fulfillment_method
        },
        {
            "name": "pickup_verification_metadata",
            "valueType": "object",
            "value": {               //pickup_verification_metadata
                "verification_type": "SCAN_BARCODE",
                "verification_code": "12345",
                "verification_format": "CODE_39"
            }
        },
        {
            "name": "contactless_dropoff",
            "value": "false" //contactless_dropoff true/false
        },
        {
            "name": "action_if_undeliverable",
            "value": "return_to_pickup" //action_if_undeliverable
        },
        {
            "name": "order_contains",
            "valueType": "object",
            "value": { //order_contains
                "alcohol": false,
                "pharmacy_items": false,
                "age_restricted_pharmacy_items": false,
                "tobacco": false,
                "hemp": false,
                "otc": false
            }
        },
        {
            "name": "pickup_window",
            "valueType": "TimePeriod",
            "value": { //pickup_window
                "startDateTime": "2025-07-09T07:00:00.000-04:00",
                "endDateTime": "2025-07-09T17:00:00.000-04:00"
            }
        },
        {
            "name": "locale",
            "value": "en-US" //locale
        }
    ],
    "shippingOrderItem": [
        {
            "id": "D-134556", //external_delivery_id
            "quantity": "2", //item[].quantity
            "action": "add",
            "shipment": {
                "collectionDate": "2025-07-09T07:00:00.000-04:00", //pickup_time
                "completionDate": "2025-07-10T07:00:00.000-04:00", //dropoff_time
                "expectedDeliveryDate": "2025-07-10T07:00:00.000-04:00" //customer_expected_sla
            },
            "product": {
                "id": "123-123443434b", //items[].external_id
                "name": "Mega Bean and Cheese Burrito" //items[].name
            },
            "productPrice": [
                {
                    "priceType": "itemPrice",
                    "price": {
                        "taxIncludedAmount": {
                            "value": 110, //items[].price
                            "unit": "USD"
                        }
                    }
                }
            ],
            "externalIdentifier": [
                    {
                        "id": "Order number 61" //pickup-reference_tag
                    }
                ],
            "shipmentCharacteristic": [
                {
                    "name": "dimensions",
                    "valueType": "object",
                    "value": {
                        "height": 2.8, //items[].height
                        "width": 2.8, //items[].width
                        "length": 2.8 //items[].length
                    }
                },
                {
                    "name": "weight",
                    "value": "3.6" //items[].weight
                },
                {
                    "name": "volume",
                    "value": "5.6" //items[].volume
                },
                {
                    "name": "barcode",
                    "value": "567886" //items[].barcode
                },
                {
                    "name": "special_instructions",
                    "value": "Only Ripen Bananas" //items[].special_instructions
                },
                {
                    "name": "external_instance_id",
                    "value": "12" //items[].external_instance_id
                },
                {
                    "name": "description",
                    "value": "Mega Burrito contains the biggest beans of the land with extra cheese." //items[].description
                }
            ]
        }
    ],
    "shippingOrderPrice": {
        "priceType": "deliveryQuote",
        "price": {
            "taxIncludedAmount": {
                "unit": "USD",
                "value": 19.99 //order_value
            }
        },
        "priceAlteration": {
            "priceType": "tip",
            "price": {
                "taxIncludedAmount": {
                    "value": 5.99 //tip
                }
            }
        }
    }
}'
Definitions

Each of the request parameters is detailed.

NameTypeDescriptionRequired
placeToObjectObject describes drop off addressY
placeTo.@referredTypeStringReference type of the destination place (GeographicAddress)Y
placeTo.nameStringComma-separated full address of the destinationY
placeTo.cityStringCity for the addressN
placeTo.countryStringCountry needs to be passed as an ISO 3166 Alpha 2 codeY
placeTo.postCodeStringZip code for the address. 5 digit zip code for US addresses.N
placeTo.stateOrProvinceStringState for the address. 2 letter state codes for US addresses. For instance, “CA” for CaliforniaN
placeTo.streetNameStringThe street address of the drop-off location.N
placeTo.geographicLocationObjectBounding Box InformationN
placeTo.geographicLocation.bboxArrayLongitude, Latitude
placeTo.geographicLocation.@typeStringType of geographicLocationN
placeTo.roleStringRole of the place (Recipient)Y
placeFromObjectObject describes drop off addressY
placeFrom.@referredTypeStringReference type of pickup placeY
placeFrom.nameStringComma-separated full address of the pickup locationN
placeFrom.geographicSubAddress.idStringPickup Business idY
placeFrom.geographicSubAddress.nameStringPickup Store idN
placeFrom.roleStringRole of the place (PickupStore)Y
relatedParty[].nameStringParty name (Business Name/Dropoff Name)N
relatedParty[].roleStringParty role (Recipient, PickupStore)Y
relatedParty[].@referredTypeStringType of party (Individual, Organization)Y
relatedParty[].contactMedium[].mediumTypeStringContact type (e.g., Phone)N
relatedParty[].contactMedium[].preferredBooleanWhether it is the preferred contact methodN
relatedParty[].contactMedium[].characteristic.phoneNumberStringContact phone number
Mandatory for dropoff
Y*
shippingInstruction.signatureRequiredBooleanWhether signature is required on deliveryN
shippingInstruction.deliveryTimeSlot.startDateTimeDateTimeStart time of delivery slotN
shippingInstruction.deliveryTimeSlot.endDateTimeDateTimeEnd time of delivery slotN
shippingInstruction.instructionCharacteristic[].nameStringName of instruction (pickup_instructions, etc.)N
shippingInstruction.instructionCharacteristic[].valueStringInstruction textN
shippingOrderCharacteristic[].nameStringName of metadata (e.g., tip, order_contains)N
shippingOrderCharacteristic[].valueMixedValue of the metadataN
shippingOrderCharacteristic[].valueTypeStringOptional: describes the type (e.g., object, string)N
shippingOrderItem[].idStringExternal delivery IDY
shippingOrderItem[].quantityStringQuantity of productN
shippingOrderItem[].actionStringOrder action (add, modify, etc.)Y
shippingOrderItem[].shipment.collectionDateDateTimePickup timeN
shippingOrderItem[].shipment.completionDateDateTimeDrop-off timeN
shippingOrderItem[].shipment.expectedDeliveryDateDateTimeExpected SLA deliveryN
shippingOrderItem[n].externalIdentifier[].idStringA reference that can help Dasher identify the correct delivery item for pick up/drop-off.N
shippingOrderItem[].product.idStringProduct ID. i.e Item external idN
shippingOrderItem[].product.nameStringProduct nameN
shippingOrderItem[].shipmentCharacteristic[].nameStringCharacteristic name (weight, volume, price, etc.)N
shippingOrderItem[].shipmentCharacteristic[].valueMixedCharacteristic valueN
shippingOrderItem[].shipmentCharacteristic[].valueTypeString(Optional) Type of the value, e.g., object, stringN
shippingOrderPrice.priceTypeStringType of price (deliveryQuote)N
shippingOrderPrice.price.taxIncludedAmount.unitStringCurrency (e.g., USD)N
shippingOrderPrice.price.taxIncludedAmount.valueNumberTotal price including taxN
shippingOrderPrice.priceAlteration.priceTypeStringType of price (tip)N
shippingOrderPrice.priceAlteration.taxIncludedAmount.valueNumberTip provided to dasherN
Response
{
  "id": "D-1763", //external_delivery_id
  "shippingOrderCharacteristic": [
        {
            "name": "tracking_url",
            "value": "https://doordash.com/tracking?id=1345"  //trackingUrl
        }
  ],
  "shippingOrderPrice": {
    "priceType": "deliveryPrice",
    "price": {
      "taxIncludedAmount": {
        "value": 19.99,  //order_value
        "unit": "USD"
      },
      "dutyFreeAmount": {
        "value": 19.00,  //fee
        "unit": "USD"
      },
      "taxAmount": {
        "value": 0.99, //Tax
        "unit": "USD"
      }
    }
  },
  "relatedParty": [
    {
      "id": "1232142",    //dasher_id
      "name": "John D.",   //dasher_name
      "role": "DeliveryAgent",
      "@referredType": "Individual"
    }
  ],
  "shippingOrderItem": [
    {
      "id": "D-1763",
      "action": "add",
      "shipment": {
        "collectionDate": "2025-07-09T07:00:00.000-04:00",  //pickup_time_actual
        "pickupDate": "2025-07-09T07:00:00.000-04:00", //pickup_time_estimated
        "expectedDeliveryDate": "2025-07-09T07:00:00.000-04:00" //dropoff_time_estimated
      }
    }
  ],
  "status": "quoted"  //delivery_status
}
Definitions

Each of the response parameters is detailed.

NameTypeDescriptionrequired
idstringExternal Delivery idY
shippingOrderCharacteristic[name = "tracking_url"].valuestringTracking urlN
shippingOrderPrice.priceTypestringType of price (deliveryQuote)N
shippingOrderPrice.price.taxIncludedAmount.valuenumberOrder ValueN
shippingOrderPrice.price.dutyFreeAmount.valuenumberDelivery FeeN
shippingOrderPrice.price.taxAmount.valuenumberTax amountN
relatedParty.idstringDasher IdN
relatedParty.namestringDasher NameN
relatedParty.rolestringRelated Party Role. i.e DeliveryAgentN
relatedParty.@referredTypestringReffered type of related party. i.e IndividualN
shippingOrderItem.idstringExternal Delivery idN
shippingOrderItem.actionstringAction performed. "add" in this caseN
shippingOrderItem.shipment.collectionDatedatetimeActual Pickup timeN
shippingOrderItem.shipment.pickupDatedatetimeEstimated pickup timeN
shippingOrderItem.shipment.expectedDeliveryDatedatetimeEstimated dropoff timeN
statusstringDelivery StatusN

Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400,
      "message" : "The request is invalid or not properly formed.",
      "description" : "Malformed request syntax, invalid request message framing, or deceptive request routing."
    }]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{
      "code" : 404,
      "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method DELETE not allowed for : /shippingOrder"
        }]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "Internal Server Error",
      "description": "The request failed due to an internal error"
    }]
}
[ 501 ]

Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

{
  "errors" : [{
      "code" : 501,
      "message" : "Not implemented",
      "description" : "Operation POST /shippingOrder for Business Id: xxxx not implemented"
    }]
  }

Reviews